﻿using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ST.Torch.WebApi.Core.Entities.Utils
{
   /// <summary>
   /// 自动生成数据
   /// </summary>
    public class AutomaticCodeGeneration : BaseEntity, IEntityTypeBuilder<AutomaticCodeGeneration>
    {
        /// <summary>
		/// 普通输入框-第一个string 做搜索条件
		/// </summary>
		[MaxLength(100)]
        public string InputStr { get; set; }
        /// <summary>
		/// 图片--1
		/// </summary>
        [MaxLength(200)]
        public string User1ImgUrl { get; set; }
        /// <summary>
        /// 图片--
        /// </summary>
        [MaxLength(200)]
        public string User2ImgUrl { get; set; }
        /// <summary>
		/// 文件1
		/// </summary>
		[MaxLength(200)]
        public string User1FileUrl { get; set; }
        /// <summary>
		/// 文件2
		/// </summary>
		[MaxLength(200)]
        public string User2FileUrl { get; set; }

        /// <summary>
		/// 富文本框1
		/// </summary>
        public string Content1Html { get; set; }
        /// <summary>
		/// 富文本框2
		/// </summary>
        public string Content2Html { get; set; }
        /// <summary>
        /// selec选择框-爱好
        /// </summary>
        public SelectEnum SelectVal { get; set; }
        /// <summary>
        /// selec选择框-状态
        /// </summary>
        public StartEnum StartType { get; set; }
        /// <summary>
		/// 数字输入框1
		/// </summary>
        public int NumberVal1 { get; set; }
        /// <summary>
		/// 数字输入框2
		/// </summary>
        public int NumberVal2 { get; set; }
        /// <summary>
        /// 是否显示1
        /// </summary>
        public bool IsShow1 { get; set; }
        /// <summary>
        /// 是否显示2
        /// </summary>
        public bool IsShow2 { get; set; }
        /// <summary>
        /// 过期时间
        /// </summary>
        public DateTime? XXTime { get; set; }


        public void Configure(EntityTypeBuilder<AutomaticCodeGeneration> entityBuilder, DbContext dbContext, Type dbContextLocator)
        {
            entityBuilder.HasKey(u => u.Id);

        }
       
    }

    public enum SelectEnum
    {
        /// <summary>
        /// 写作
        /// </summary>
        Write,
        /// <summary>
        /// 阅读
        /// </summary>
        Read,
        /// <summary>
        /// 发呆
        /// </summary>
        Dai
    }
    public enum StartEnum
    {
        /// <summary>
        /// 进行中
        /// </summary>
        Doing,
        /// <summary>
        /// 过去
        /// </summary>
        Doed=3,
        /// <summary>
        /// 过去完成
        /// </summary>
        Dai
    }

    
}
